import request from "@/config/utils/request";
//结算列表
export function listSettlementPage(data) {
  return request({
    url: "apis/smp/transSettlement/listPageTransSettlement",
    method: "post",
    data
  });
}

//保存结算单
export function saveSettlement(data) {
  return request({
    url: "/apis/smp/transSettlement/saveTransSettlement",
    method: "post",
    data
  });
}

//编辑结算单
export function editTransSettlement(data) {
  return request({
    url: "/apis/smp/transSettlement/editTransSettlement",
    method: "post",
    data
  });
}

//查询结算单
export function getSettlementById(data) {
  return request({
    url: "/apis/smp/transSettlement/getTransSettlement",
    method: "post",
    data
  });
}

//提交结算单
export function submitSettlement(data) {
  return request({
    url: "/apis/smp/transSettlement/submitSettlement",
    method: "post",
    data
  });
}

//结算查询有效合同列表
export function listSmpTransportForScPage(data) {
  return request({
    url: "/apis/smp/smptransportconc/listSmpTransportForScPage",
    method: "post",
    data
  });
}
//结算根据合同id查询合同详情
export function getSmpPcConcById(data) {
  return request({
    url: "/apis/smp/smptransportconc/getSmpTransportForScByConcId",
    method: "post",
    data
  });
}

//删除运输结算单
export function removeSettlement(data) {
  return request({
    url: "/apis/smp/transSettlement/removeTransSettlement",
    method: "post",
    data
  });
}

//撤回运输结算单
export function revokeSettlement(data) {
  return request({
    url: "/apis/smp/transSettlement/recallTransSettlement",
    method: "post",
    data
  });
}

// 结算根据合同id查询物资清单
export function selectSmpTransportForScById(data) {
  return request({
    url: "/apis/smp/smptransportconc/selectSmpTransportForScById",
    method: "post",
    data
  });
}


// 暂存接口
export function tsSettlement(data) {
  return request({
    url: "/apis/smp/transSettlement/tsSettlement",
    method: "post",
    data
  });
}

// 退回接口
export function sendBackSupplierSettlement(data) {
  return request({
    url: "/apis/smp/settlement/sendBackSupplierSettlement",
    method: "post",
    data
  });
}

// 查询用户信息
export function getUserInfo(url, data) {
  return request({
    url,
    method: "POST",
    data
  });
}